<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2019/5/10
 * Time: 16:31
 */

function dbhealper ($sql){
    $dbHost='127.0.0.1';
    $dbName='root';
    $dbUpwd='';
    $dbRoot='3306';
    $dbUname='mengbasha';
    //创建连接字符集
    $conn=new mysqli($dbHost,$dbName,$dbUpwd,$dbUname,$dbRoot);
    mysqli_query($conn,"set names utf8");
    $result=$conn->query($sql);

    $conn->close();

    return $result;

};
